package outrasolucao;

public class Custo implements Comparable<Custo> {

	private Object valor;
	
	public Custo(Object valor) {
		this.valor = valor;
	}
	
	public Object getValor() {
		return valor;
	}
	
	@Override
	public int compareTo(Custo o) {
		
		if (o.valor instanceof Double && this.valor instanceof Double) {
			return ((Double) this.valor).compareTo((Double) o.valor);
		}

		return 0;
	}

}
